const Koa = require("koa");
const koaStatic = require("koa-static");
const path = require("path");
const getServiceIp = require("./utils/getServiceIp.js");
const ip = getServiceIp();

const app = new Koa();

app.use(koaStatic(path.join(__dirname), "/public"));
app.use(koaStatic("D:\\", "/down"));

app.listen(3000, () => {
  console.log("服务已启动!", `http://${ip}:3000/`);
  console.log("静态资源服务已启动!", [
    `http://${ip}:3000/public`,
    `http://${ip}:3000/down`,
  ]);
});
